home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / nos042_s / telnet.h < prev    next >
C/C++ Source or Header  |  1994-09-16  |  2KB  |  70 lines

  1. /*
  2.     -----------------------------------------------------
  3.     ATARI Version by David Nash - dnash@chaos.demon.co.uk
  4.  
  5.     Added __stdargs to tel_output and ttylhandle
  6.     -----------------------------------------------------
  7. */
  8.  
  9. #ifndef    _TELNET_H
  10. #define    _TELNET_H
  11.  
  12. #ifndef _SESSION_H
  13. #include "session.h"
  14. #endif
  15.  
  16. #define    LINESIZE    256    /* Length of local editing buffer */
  17.  
  18. /* Telnet command characters */
  19. #define    IAC        255    /* Interpret as command */
  20. #define    WILL        251
  21. #define    WONT        252
  22. #define    DO        253
  23. #define    DONT        254
  24.  
  25. /* Telnet options */
  26. #define    TN_TRANSMIT_BINARY    0
  27. #define    TN_ECHO            1
  28. #define    TN_SUPPRESS_GA        3
  29. #define    TN_STATUS        5
  30. #define    TN_TIMING_MARK        6
  31. #define    NOPTIONS        6
  32.  
  33. /* Telnet protocol control block */
  34. struct telnet {
  35.     char local[NOPTIONS];    /* Local option settings */
  36.     char remote[NOPTIONS];    /* Remote option settings */
  37.     struct session *session;    /* Pointer to session structure */
  38.     char eolmode;        /* Control translation of enter key */
  39. };
  40. #define    NULLTN    (struct telnet *)0
  41.  
  42. extern int Refuse_echo;
  43. extern int Tn_cr_mode;
  44.  
  45. /* In telnet.c: */
  46. int tel_connect __ARGS((struct session *sp,char *fsocket,int len));
  47.  
  48. #ifndef ATARI
  49. void tel_output __ARGS((int unused,void *p1,void *p2));
  50. #else
  51. void __stdargs tel_output (int unused, void *p1, void *p2);
  52. #endif
  53.  
  54. void tnrecv __ARGS((struct telnet *tn));
  55. void doopt __ARGS((struct telnet *tn,int opt));
  56. void dontopt __ARGS((struct telnet *tn,int opt));
  57. void willopt __ARGS((struct telnet *tn,int opt));
  58. void wontopt __ARGS((struct telnet *tn,int opt));
  59. void answer __ARGS((struct telnet *tn,int r1,int r2));
  60.  
  61. /* In ttylink.c: */
  62.  
  63. #ifndef ATARI
  64. void ttylhandle __ARGS((int s,void *unused,void *p));
  65. #else
  66. void __stdargs ttylhandle(int s, void *unused, void *p);
  67. #endif
  68.  
  69. #endif    /* _TELNET_H */
  70.